<div class="content1" href="">











    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>商户交易风险监控</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/base.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/layer.css" rel="stylesheet">
    <link href="css/pagination.css" rel="stylesheet">
    <link href="css/bootstrap-datetimepicker.css" rel="stylesheet">
    <link href="css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="css/jedate.css" rel="stylesheet">
    <style>
        #loanDetail{
            background-color: #fff;
            margin-bottom: 15px;
        }
        #loanDetail p{
            padding-left:0 ;
            padding-right: 0;
            margin: 6px 0 ;
        }
        #loanDetail .wd_60{
            display: inline-block;
            width: 102px;
            text-align: right;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .c13 .wd_60{
            float: left;
            margin-top: 5px;
        }
        #loanDetail .c13 input{
            float: left;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .col-lg-3 ,#loanDetail .c13{
            margin:5px 0;
            padding-left:5px;
            padding-right: 5px;
        }

        #loanDetail select option{
            font-size: 12px;
            font-family: "微软雅黑";
        }
        .search_btn {
            font-size: 12px;
            background-color: #09C;
            padding: 5px 16px;
            margin-top: 3px;
            margin-bottom: 5px;
        }
        .ta_r{
            text-align: right;
        }
        .mr_25{
            margin-right: 25px;
        }
        .h_25{
            height: 25px;
        }
        .cardSelect{
            border: 1px solid #ddd;
            height: 25px;
            width: 150px;
            font-size: 12px;
        }
        .text-center{
            text-align:center;
            white-space: nowrap;
        }
    </style>

<div class="hui"><img src="images/ajax-loader.gif"></div>
<div class="content">
    <!--面包屑导航start-->
    <ol class="breadcrumb">
        <li class="active">商户交易风险监控</li>
    </ol>
    <div id="loanDetail" class="col-lg-12 col-md-12 col-sm-12">
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">商户名称&nbsp;&nbsp;</span><input type="text" id="bizName"></div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">预警类型&nbsp;&nbsp;</span>
            <select id="riskType">
                <option value="">请选择</option>
                <option value="1">交易时间</option>
                <option value="2">交易频次</option>
                <option value="3">交易结果</option>
            </select>
        </div>
        <div class="col-lg-3 col-md-3 col-sm-3 "><span class="wd_60">预警时间(开始)&nbsp;&nbsp;</span><input type="text" id="dateStart" value="" placeholder="请选择时间" readonly=""></div>
        <div class="col-lg-3 col-md-3 col-sm-3 "><span class="wd_60">预警时间(结束)&nbsp;&nbsp;</span><input type="text" id="dateEnd" value="" placeholder="请选择时间" readonly=""></div>

        <div class="clear"></div>
        <div class="col-lg-12 col-md-12 col-sm-12  text-center">
            <button class="btn btn-primary btn-sm search_btn" type="button" id="btn-search">查询</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button class="btn btn-primary btn-sm search_btn mr_25" type="button" id="btn-export" onclick="exportResult();">导出</button>
        </div>
        <div class="clear"></div>
    </div>
    <div style="overflow-x: auto;">
        <div class="table-responsive">
            <div id="lendingList_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer"><div class="top"><div class="clear"></div></div><div id="lendingList_processing" class="dataTables_processing panel panel-default" style="display: none;">处理中...</div><div class="dataTables_scroll"><div class="dataTables_scrollHead" style="overflow: hidden; position: relative; border: 0px; width: 100%;"><div class="dataTables_scrollHeadInner" style="box-sizing: content-box; width: 1139px; padding-right: 0px;"><table style="overflow: auto; margin-left: 0px; width: 1139px;" class="table table-bordered table-striped table-hover bg_wt dataTable no-footer" role="grid"><thead style="border-bottom: 0;background-color: #fff;">
                <tr role="row"><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="width: 165px;">预警时间</th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="width: 124px;">预警类型</th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="width: 124px;">预警等级</th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="width: 124px;">触发次数</th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="width: 516px;">商户名称</th></tr></thead></table></div></div><div class="dataTables_scrollBody" style="position: relative; overflow: auto; width: 100%;"><table id="lendingList" style="overflow: auto; " class="table table-bordered table-striped table-hover bg_wt dataTable no-footer" role="grid" aria-describedby="lendingList_info"><thead style="border-bottom: 0;background-color: #fff;">
                <tr role="row" style="height: 0px;"><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="padding-top: 0px; padding-bottom: 0px; border-top-width: 0px; border-bottom-width: 0px; height: 0px; width: 165px;"><div class="dataTables_sizing" style="height:0;overflow:hidden;">预警时间</div></th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="padding-top: 0px; padding-bottom: 0px; border-top-width: 0px; border-bottom-width: 0px; height: 0px; width: 124px;"><div class="dataTables_sizing" style="height:0;overflow:hidden;">预警类型</div></th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="padding-top: 0px; padding-bottom: 0px; border-top-width: 0px; border-bottom-width: 0px; height: 0px; width: 124px;"><div class="dataTables_sizing" style="height:0;overflow:hidden;">预警等级</div></th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="padding-top: 0px; padding-bottom: 0px; border-top-width: 0px; border-bottom-width: 0px; height: 0px; width: 124px;"><div class="dataTables_sizing" style="height:0;overflow:hidden;">触发次数</div></th><th class="sorting_disabled text-center fs_13" rowspan="1" colspan="1" style="padding-top: 0px; padding-bottom: 0px; border-top-width: 0px; border-bottom-width: 0px; height: 0px; width: 516px;"><div class="dataTables_sizing" style="height:0;overflow:hidden;">商户名称</div></th></tr></thead>
                
            <tbody><tr role="row" class="odd"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">66</td><td class=" text-center fs_13">南长区瑞卓通讯设备经营部</td></tr><tr role="row" class="even"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">63</td><td class=" text-center fs_13">盐城市亭湖区泽轩通讯经营部</td></tr><tr role="row" class="odd"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">39</td><td class=" text-center fs_13">西安市雁塔区云凯数码器材商行</td></tr><tr role="row" class="even"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">33</td><td class=" text-center fs_13">常熟市虞山镇闪银手机软件技术咨询服务部</td></tr><tr role="row" class="odd"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">27</td><td class=" text-center fs_13">阳江市天智电讯器材有限公司</td></tr><tr role="row" class="even"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">24</td><td class=" text-center fs_13">陕西加蓝商贸有限公司</td></tr><tr role="row" class="odd"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">22</td><td class=" text-center fs_13">个体邵长美</td></tr><tr role="row" class="even"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">22</td><td class=" text-center fs_13">南宁市兴之诺电子产品经营部</td></tr><tr role="row" class="odd"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">20</td><td class=" text-center fs_13">济南市长清区二十四小时便利店</td></tr><tr role="row" class="even"><td class=" text-center fs_13">2019-05-20</td><td class=" text-center fs_13">交易时间</td><td class=" text-center fs_13">预警+</td><td class=" text-center fs_13">19</td><td class=" text-center fs_13">西安曲江新区明旭手机经销部</td></tr></tbody></table></div></div><div class="bottom"><div class="dataTables_info" id="lendingList_info" role="status" aria-live="polite">显示第 1 - 10 条记录，共202 条</div><div class="dataTables_length" id="lendingList_length"><label> <select name="lendingList_length" aria-controls="lendingList" class="form-control input-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> </label></div><div class="dataTables_paginate paging_full_numbers" id="lendingList_paginate"><ul class="pagination"><li class="paginate_button first disabled" id="lendingList_first"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="0" tabindex="0">首页</a></li><li class="paginate_button previous disabled" id="lendingList_previous"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="1" tabindex="0">上页</a></li><li class="paginate_button active"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="2" tabindex="0">1</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="3" tabindex="0">2</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="4" tabindex="0">3</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="5" tabindex="0">4</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="6" tabindex="0">5</a></li><li class="paginate_button disabled" id="lendingList_ellipsis"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="7" tabindex="0">…</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="8" tabindex="0">21</a></li><li class="paginate_button next" id="lendingList_next"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="9" tabindex="0">下页</a></li><li class="paginate_button last" id="lendingList_last"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="10" tabindex="0">末页</a></li></ul></div><div class="clear"></div></div></div>
        </div>
    </div>
    <!--正文内容end-->
</div>
<script src="jedate/jedate.min.js"></script>
<script>
    jeDate({
        dateCell:"#dateStart", //目标元素。由于jedate.js封装了一个轻量级的选择器，因此dateCell还允许你传入class、tag这种方式 '#id .class'
        format:"YYYY-MM-DD", //日期格式
        minDate:"1900-01-01 00:00:00", //最小日期
        maxDate:"2099-12-31 23:59:59", //最大日期
        isinitVal:false, //是否初始化时间
        isTime:true, //是否开启时间选择
        isClear:true, //是否显示清空
        festival:false, //是否显示节日
        zIndex:999,  //弹出层的层级高度
        marks:null, //给日期做标注
        choosefun:function(val) {},  //选中日期后的回调
        clearfun:function(val) {},   //清除日期后的回调
        okfun:function(val) {}       //点击确定后的回调
    });
    jeDate({
        dateCell:"#dateEnd", //目标元素。由于jedate.js封装了一个轻量级的选择器，因此dateCell还允许你传入class、tag这种方式 '#id .class'
        format:"YYYY-MM-DD", //日期格式
        minDate:"1900-01-01 00:00:00", //最小日期
        maxDate:"2099-12-31 23:59:59", //最大日期
        isinitVal:false, //是否初始化时间
        isTime:true, //是否开启时间选择
        isClear:true, //是否显示清空
        festival:false, //是否显示节日
        zIndex:999,  //弹出层的层级高度
        marks:null, //给日期做标注
        choosefun:function(val) {},  //选中日期后的回调
        clearfun:function(val) {},   //清除日期后的回调
        okfun:function(val) {}       //点击确定后的回调
    });

</script>

<script>
    var dt;
    function refresh(){
        dt.api(dt.api().page()).draw(false);
    }
    function fmoney(s, n) {
        n = n > 0 && n <= 20 ? n : 2;
        s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
        var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1];
        t = "";
        for (i = 0; i < l.length; i++) {
            t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
        }
        return t.split("").reverse().join("") + "." + r;
    }
    function imoney(s,n) {
        n = n > 0 && n <= 20 ? n : 2;
        s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
        var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1];
        t = "";
        for (i = 0; i < l.length; i++) {
            t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
        }
        return t.split("").reverse().join("");
    }
    $(function(){

        var columns = new Array();

        $.ajax({
            type: 'GET',
            url:"/hd/hdStatisticalReportBiz/getHdStatisticalReportColumns",
            dataType: "json",
            data: {
                tableName: "hd_statistical_alipay_risk_report"
            },
            async:false,
            success: function (data) {
                if(data.length>0){
                    for(var i=0;i<data.length;i++){
                        var d=data[i];
                        d["defaultContent"]='--';
                        d["render"]=(function(data,type,row){
                            if(null==data){
                                return '--';
                            }
                            if(isNaN(data)){
                               return  data;
                            }else{
                                var re = /^[1-9]+[0-9]*]*$/ ; //判断字符串是否为数字/^[0-9]+.?[0-9]*$/ //判断正整数 /^[1-9]+[0-9]*]*$/
                                if (!re.test(data)){
                                    return fmoney(data,2);
                                }else{
                                    return imoney(data);
                                }
                            }
                        });
                    }
                }
                columns = data;
            }
        });

        dt = $("#lendingList").dataTable({
            "sDom":'<"top"<"clear">>rt<"bottom"ilp<"clear">>',
            bProcessing:true,
            pageLength: 10,
            searching: false, // 禁用dataTables自带的查询框
            ordering: false, // 禁用排序
            "autoWidth":false,
            autoHeight:false,
            "scrollX": true,
            "scrollX": 2000,
            "scrollY": 700,
            "scrollY": true,
            ajax: {
                type: "POST",
                url: "/hd/hdStatisticalReportBiz/getHdStatisticalAlipayRiskReportData",
                data:function(d) {
                    d.tableName = "hd_statistical_alipay_risk_report";
                    d.bizName=$("#bizName").val();
                    d.riskType=$("#riskType").val();
                    d.dateStart=$("#dateStart").val();
                    d.dateEnd=$("#dateEnd").val();
                }
            },
            columns:columns
        });

        $("#btn-search").click(function(e){
            dt.api().draw();
        });
    })
</script>


<script>
    //分页方法
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }

    function exportResult(){
        layer.confirm("确定要导出结果到excel中吗？", {
            btn: ['确认','取消'], //按钮
            yes:function (index, layero) {
                var url="/hd/hdStatisticalReportBiz/hdStatisticalAlipayRiskReportExport?tableName=hd_statistical_alipay_risk_report";
                window.open(url);
                layer.close(index);
            },
            cancel:function(index){
                //按钮【按钮二】的回调
                layer.close(index);
            },
        });
    }

</script>

<script>
    var time = 100000;
    var interval; //调度器对象。
    function run(){
        interval = setInterval("fun()",time);
    }
    function fun(){
        $(".hui").css("display","none");
    }
    $(function(){
        $("#reviewList").delegate('tr td button','click',function(){
            $(this).html("加载中...").attr("disabled","disabled");
            $(".hui").css("display","block");
            run();
        })
    })
</script>

<script>
    $(document).ready(function(e) {
        var counter = 0;
        if (window.history && window.history.pushState) {
            $(window).on('popstate', function () {
                window.history.pushState('forward', null, '#');
                window.history.forward(1);
            });
        }
        window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
        window.history.forward(1);
    });
</script>

</div>